﻿using Microsoft.CodeAnalysis.CSharp.Syntax;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UMLSynthesizer.CSharpAnalyzer.Helpers;
using UMLSynthesizer.LangAnalyzer.Expressions;
using UMLSynthesizer.LangAnalyzer.Statements;

namespace UMLSynthesizer.CSharpAnalyzer.Statements
{
    class CSharpGotoStatement : CSharpStatementBase, IGotoStatement
    {
        #region Fields

        CSharpExpressionHelper expressionHelper;

        #endregion

        #region Constructor

        public CSharpGotoStatement(GotoStatementSyntax statementNode, IStatementBase parentStatement)
            : base(statementNode, parentStatement, null, StatementKinds.Goto)
        {
            expressionHelper = new CSharpExpressionHelper(null, this,
               () => statementNode.Expression);
        }

        #endregion

        #region Properties

        public IExpressionBase Expression { get { return expressionHelper.Expression; } }

        #endregion
    }
}
